#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Copyright (c) 2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys
import util
import config

if __name__ == '__main__':
    assert len(sys.argv) > 1, '请输入文件名'
    file = sys.argv[1]
    path1 = f"{config.local_arkweb_dev_path}/{file}"
    path2 = config.local_google_chromium_path + "/" + file.replace("src/", "")
    command = "diff -Nau -I --ignore-all-space " + path2 + " " + path1
    util.exec_and_output(command)
